package com.peking.donations.plugins.oauth2.client;

import org.springframework.security.oauth2.client.token.grant.code.AuthorizationCodeResourceDetails;

/**
 * 
 * GitHub OAuth2 认证相关配置
 * 
 * @author Vigor Yuan
 */
public class OAuth2Resource extends AuthorizationCodeResourceDetails {

    private static final String DEFAULT_LOGIN_PATH = "/login/oauth2/github";

    /**
     * Path to the login page, i.e. the one that triggers the redirect to the
     * OAuth2 Authorization Server.
     */
    private String loginPath = DEFAULT_LOGIN_PATH;

    /**
     * Filter order to apply if not providing an explicit
     * WebSecurityConfigurerAdapter (in which case the order can be provided
     * there instead).
     */
    private Integer filterOrder;

    /**
     * Path to get userInfo
     */
    private String userInfoUri;

    private String refreshAccessTokenUri;

    private String name;

    public String getLoginPath() {
        return this.loginPath;
    }

    public void setLoginPath(String loginPath) {
        this.loginPath = loginPath;
    }

    public Integer getFilterOrder() {
        return this.filterOrder;
    }

    public void setFilterOrder(Integer filterOrder) {
        this.filterOrder = filterOrder;
    }

    public String getUserInfoUri() {
        return userInfoUri;
    }

    public void setUserInfoUri(String userInfoUri) {
        this.userInfoUri = userInfoUri;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRefreshAccessTokenUri() {
        return refreshAccessTokenUri;
    }

    public void setRefreshAccessTokenUri(String refreshAccessTokenUri) {
        this.refreshAccessTokenUri = refreshAccessTokenUri;
    }
}
